#ifndef RequestCreator_H
#define RequestCreator_H

#include "HttpClient.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef enum _ERequestType {
	ePage,
	eFile,
	eNotPage
}ERequestType;

typedef struct _HttpNetworkRequestData
{
	QCHAR sUsrID[16];
	QCHAR cTabID;
	QCHAR cSupportGZip;
	QCHAR* sSession;
	QCHAR* sUrl;
	QCHAR* sUserHttpHeader;
	QCHAR* sPageEncodeName;
	QCHAR cPostEncrypted;
	QCHAR* sPostData;
	QINT nPostSize;
}HttpNetworkRequestData;

HttpRequest* RequestCreator_CreateRequest(HttpClient* conn, ERequestType type, QCHAR* pMethod, QCHAR* pUrl);
QBOOL RequestCreator_SetRequestPostData(HttpRequest* request, QCHAR* pPostData, QINT nPostSize);
QBOOL RequestCreator_SetRequestRoundPostData(HttpRequest* request, RoundBuf* pRoundPostData);
QBOOL RequestCreator_SetRequestRefer(HttpRequest* request, QCHAR* szRefer);
QBOOL RequestCreator_SetRequestRange(HttpRequest* request, QINT nStartPos, QINT nDownLoadSize);

HttpRequest* RequestCreator_CreateAssign(HttpClient* conn, QCHAR* sUsrID, QCHAR* sImei, QSHORT wWidth, QSHORT wHeight,QCHAR* assignServer);
HttpRequest* RequestCreator_CreateUpdateHomePage(HttpClient* conn, QCHAR* sUsrID, QSHORT wWidth, QSHORT wHeight, QSHORT wFontWidth, QUINT dwHomePageVersion);

//for www http proxy
HttpRequest* RequestCreator_CreateNetworkRequest(HttpClient* conn, HttpNetworkRequestData* httpNetworkRequestData);
HttpRequest* RequestCreator_CreateNetworkRequestPic(HttpClient* conn, QCHAR* sUsrID, QCHAR cTabID, QSHORT wPicNum, QCHAR** sUrlList);
HttpRequest* RequestCreator_CreateRequestLinkURL(HttpClient* conn, QCHAR* sUsrID, QCHAR cTabID, QCHAR* sMD5);
HttpRequest* RequestCreator_CreateRoundTimeTest(HttpClient* conn );

#ifdef __cplusplus
}
#endif //extern "C"

#endif // RequestCreator_H